﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Prices.aspx.cs" Inherits="_Default" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Tìm Giá </title>
    <script src="assets/js/Admin_002.js" type="text/javascript"></script>
    <script src="assets/js/Admin.js" type="text/javascript"></script>
    <script src="assets/js/Validation.js" type="text/javascript"></script>
    <script src="assets/js/jquery-1.4.2.js" type="text/javascript"></script>
    <%--<script type="text/javascript"
		src="http://code.jquery.com/jquery-1.5.2.min.js"></script>--%>
    <script src="assets/jquery/jquery-ui.min.js" type="text/javascript"></script>
    <script src="assets/jquery/jquery.dialog.extra.js" type="text/javascript"></script>
    <script type='text/javascript' src="assets/js/jquery.bgiframe.min.js"></script>
    <script type='text/javascript' src="assets/js/jquery.ajaxQueue.js"></script>
    <script type='text/javascript' src="assets/js/thickbox-compressed.js"></script>
    <script type='text/javascript' src="assets/js/jquery.autocomplete.js"></script>
    <script type='text/javascript' src="assets/js/Ports.js"></script>
    <script type='text/javascript' src="Assets/js/jquery-custom-1.0.0.js?v=0611"></script>
    <script type='text/javascript' src="Assets/js/zoom.js"></script>
    <script type='text/javascript' src="assets/js/Carrs.js"></script>
    <script type='text/javascript' src="Assets/js/updateprice.js"></script>
    <script type='text/javascript' src="Assets/js/encoder.js"></script>
    <script type='text/javascript' src="Assets/jquery/jquery.cookie.js"></script>
    <link href="assets/jquery/jquery-ui.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="assets/css/jquery.autocomplete.css" />
    <link rel="stylesheet" type="text/css" href="assets/css/thickbox.css" />
    <link rel="stylesheet" href="assets/css/reset.css" type="text/css" />
    <link rel="stylesheet" href="assets/css/styleexpress.css" type="text/css" />
    <link rel="stylesheet" href="assets/css/invalid.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="Assets/css/EditTableCell.css" type="text/css" />
    <link rel="stylesheet" href="Assets/css/zoom.css" type="text/css" />
    <link rel="stylesheet" type="text/css" href="assets/css/datepicker.css" />
    <script type='text/javascript' src="assets/js/jquery.ui.datepicker.js"></script>
    <script type="text/javascript" language="javascript">
        var nPermissions = '<%=nPermissions %>';
        function getUrlVars() {
            var vars = {};
            var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function (m, key, value) {
                vars[key] = value;
            });
            return vars;
        }
        function doDelete(strID, strName) {
            if (confirm('Bạn có thực sự muốn xóa ' + strName + '?')) {
                var vnpage = getUrlVars()['page_number'];
                if (vnpage)
                    window.location.href = "Prices.aspx?action=delete&ID=" + strID + "&page_number=" + vnpage;
                else
                    window.location.href = "Prices.aspx?action=delete&ID=" + strID;
            }
        }
        function doPublic(strID, pOceanID) {
            //if (confirm('Bạn có thực sự muốn public ' + strName + '?')) {
            var vnpage = getUrlVars()['page_number'];
            if (vnpage)
                window.location.href = "Prices.aspx?action=public&ID=" + strID + "&page_number=" + vnpage;
            else
                window.location.href = "Prices.aspx?action=public&ID=" + strID;
            //}
        }
        function doPricing(strID) {
            var pOceanID = getUrlVars()['pOceanID'];
            window.location.href = "Prices.aspx?action=pricing&ID=" + strID + "&pOceanID=" + pOceanID;
        }
        function doDeleteGP(strID) {
            if (confirm('Bạn có thực sự muốn xóa1 ?')) {
                window.location.href = "Prices.aspx?action=deleteGP&GID=" + strID;
            }
        }
        function doDeleteGPNotice(strID) {
            //            if (confirm('Bạn có thực sự muốn xóa ?')) {
            //                window.location.href = "Prices.aspx?action=deleteGPN&GNID=" + strID;
            //            }
            $.post('./Handlers/Event.ashx?action=deleteGPNotice&id=' + strID, function (data) {
                if (data == "ok") {
                    $(".GPN_" + strID).fadeOut(200);
                    //$("input:checkbox:checked").attr("disabled", true);
                } else {
                    alert("false=" + data);
                }
            });
        }
        $(document).ready(function () {
            //$('#txtCarrName').focus().autocomplete(carrs);
            //$('#txtPortTo').focus().autocomplete(ports);
            //$('#txtPortFrom').focus().autocomplete(ports);
            //$('#txtPortToSearch').focus().autocomplete(ports);
            //$('#txtPortFromSearch').focus().autocomplete(ports);
            //For Good Price Notices
            $('.goopricenotice.carrname').focus().autocomplete(carrs);
            $('.goopricenotice.pol').autocomplete(ports);
            $('.goopricenotice.pod').autocomplete(ports);
            $('.goopricenotice.cont').autocomplete(["20'DC", "40'DC", "40'HC", "20'RF", "40'RF"], { matchContains: true });
            $('.goopricenotice.doc').autocomplete(["MBL", "HBL"], { matchContains: true });
            $('.goopricenotice.datefrom').datepicker({ dateFormat: "M-dd-yy" });
            $(".goopricenotice.dateto").datepicker({ dateFormat: "M-dd-yy" });
            //Select Text when focus textboxx            
            $("input[type='text']").click(function () {
                $(this).select();
            });
        });
        function viewSchedules(POL, POD, CarrID) {
            jQuery.ajax({
                type: "POST",
                url: "AjaxFile/ViewShedulesFromPrice.ashx?POL=" + POL + "&POD=" + POD + "&CarrID=" + CarrID,
                success: function (msg) {
                    var vcontent = "#shedule" + CarrID;
                    $(vcontent).attr("title", msg);
                    //                    $(vcontent).tooltip({
                    //                        track: true,
                    //                        delay: 0,
                    //                        showURL: false,
                    //                        showBody: " - ",
                    //                        fade: 250
                    //                    });
                }
            });

        }
        function doOpenService(POL, POD, CarrID) {
            var url = "Carrier.Services.aspx?POL=" + POL + "&POD=" + POD + "&CarrID=" + CarrID;
            window.open(url, '_blank', 'width=850,height=800,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0', '_blank');
            window.focus();
        }
        function OnPolSelected(source, eventArgs) {
            var hdnValueID = "<%= hidPolID.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
            $("#txtPol").focus();
        }
        function OnPodSelected(source, eventArgs) {

            var hdnValueID = "<%= hidPodID.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
            $("#txtPod").focus();
        }
        function OnCarrsSelected(source, eventArgs) {

            var hdnValueID = "<%= hidCarrID.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
            $("#txtCarr").focus();
        }
        function OnServiceAreaFromSelected(source, eventArgs) {

            var hdnValueID = "<%= hidServiceAreaFromSearch.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
        }
        function OnRegionFromSelected(source, eventArgs) {

            var hdnValueID = "<%= hidRegionFromSearch.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
        }
        function OnCountryFromSelected(source, eventArgs) {

            var hdnValueID = "<%= hidCountryFromSearch.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
        }
        function OnServiceAreaToSelected(source, eventArgs) {

            var hdnValueID = "<%= hidServiceAreaToSearch.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
        }
        function OnRegionToSelected(source, eventArgs) {

            var hdnValueID = "<%= hidRegionToSearch.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
        }
        function OnCountryToSelected(source, eventArgs) {

            var hdnValueID = "<%= hidCountryToSearch.ClientID %>";
            document.getElementById(hdnValueID).value = eventArgs.get_value();
        }
    </script>
    <style type="text/css">
        #divSearch input[type=text] {
            border-radius: 7px;
            border: none;
            line-height: 22px;
            margin: 2px;
            font-size: 12px;
            /*padding: 3px;*/
        }
    </style>
</head>
<body>
    <div id="body-wrapper">
        <div id="header">
            <!--#include virtual="include/top.ascx"-->
        </div>
        <div id="main-content1">
            <%-- <h2>
                TÌM GIÁ</h2>
            <div class="clear">
            </div>--%>
            <div class="content-box">
                <form id="frmPrices" runat="server" autocomplete="off" defaultbutton="btnSearch">
                    <div zoomable="true">
                        <div class="content-box-header">
                            <h3 style="cursor: s-resize;">TÌM GIÁ
                            </h3>
                            <input type="button" style="float: right; margin: 7px 7px 0px 0px;" class="button"
                                value="Edit" id="btnsave" runat="server" visible="false" />
                            <asp:Button ID="btnViewAllSchedules" runat="Server" Text="All Schedules" CssClass="button"
                                OnClick="btnViewAllSchedules_Click" OnClientClick="frmPrices.target ='_blank';" Style="float: right; margin: 7px 7px 0px 0px;" />
                            <asp:Button ID="btnPricingArea" runat="Server" Text="Pricing Area" CssClass="button"
                                OnClick="btnPricingArea_Click" OnClientClick="frmPrices.target ='_blank';" Style="float: right; margin: 7px 7px 0px 0px;" />
                            <asp:Button ID="btnInit" CssClass="button" Style="float: right; margin: 7px 7px 0px 0px;"
                                runat="server" TabIndex="15" Text="Save" OnClick="btnSave_Click" Visible="false" />
                        </div>
                        <div id="divSearch">
                            <div style="height: auto; padding-top: 7px;">
                                <span style="background: #e5e5e5 url('/assets/images/bg-content-box.gif') top left repeat-x; padding: 12px; border-radius: 7px; margin-right: 20px;">
                                    <asp:ToolkitScriptManager ID="ScriptManager1" runat="server">
                                    </asp:ToolkitScriptManager>
                                    <asp:TextBox ID="txtCarr" name="txtCarr" runat="server" Width="50px" PlaceHolder="Carr"></asp:TextBox>
                                    <asp:HiddenField ID="hidCarrID" runat="server" />
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtender5" runat="server" ServiceMethod="CarrsAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtCarr" FirstRowSelected="true"
                                        CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                        OnClientItemSelected="OnCarrsSelected">
                                    </asp:AutoCompleteExtender>
                                    <%--<asp:TextBox class="cls" ID="txtPortToSearch" runat="server" Width="200px" TabIndex="16"></asp:TextBox>--%>
                                    <asp:TextBox ID="txtPol" name="txtPol" runat="server" Width="120px" PlaceHolder="Pol"
                                        BackColor="AliceBlue" Font-Bold="true"></asp:TextBox>
                                    <asp:HiddenField ID="hidPolID" runat="server" />
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtender2" runat="server" ServiceMethod="PortAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtPol" FirstRowSelected="true"
                                        CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                        OnClientItemSelected="OnPolSelected">
                                    </asp:AutoCompleteExtender>
                                    <asp:TextBox class="cls" ID="txtCountryFromSearch" runat="server" Width="90px" PlaceHolder="Frm Country"></asp:TextBox>
                                    <asp:HiddenField ID="hidCountryFromSearch" runat="server"></asp:HiddenField>
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtenderCountry" runat="server" ServiceMethod="CountryAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtCountryFromSearch"
                                        FirstRowSelected="true" CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                        OnClientItemSelected="OnCountryFromSelected">
                                    </asp:AutoCompleteExtender>

                                    <%--From Service Area--%>
                                    <asp:TextBox class="cls" ID="txtServiceAreaFromSearch" runat="server" Width="110px"
                                        PlaceHolder="Frm SerArea"></asp:TextBox>
                                    <asp:HiddenField ID="hidServiceAreaFromSearch" runat="server"></asp:HiddenField>
                                    <asp:AutoCompleteExtender ID="AutoCompleteServiceArea" runat="server" ServiceMethod="ServiceAreaAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtServiceAreaFromSearch"
                                        FirstRowSelected="true" CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" OnClientItemSelected="OnServiceAreaFromSelected">
                                    </asp:AutoCompleteExtender>
                                    <%--From Region--%>
                                    <asp:TextBox class="cls" ID="txtRegionFromSearch" runat="server" Width="110px"
                                        PlaceHolder="Frm Region"></asp:TextBox>
                                    <asp:HiddenField ID="hidRegionFromSearch" runat="server"></asp:HiddenField>
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtender7" runat="server" ServiceMethod="RegionAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtRegionFromSearch"
                                        FirstRowSelected="true" CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" OnClientItemSelected="OnRegionFromSelected">
                                    </asp:AutoCompleteExtender>
                                    <!-- Search TO -->
                                    <%--<asp:TextBox class="cls" ID="txtPortFromSearch" runat="server" Width="200px" TabIndex="17"></asp:TextBox>--%>
                                    <asp:TextBox ID="txtPod" name="txtPod" runat="server" Width="120px" PlaceHolder="Pod"
                                        BackColor="AliceBlue" Font-Bold="true"></asp:TextBox>
                                    <asp:HiddenField ID="hidPodID" runat="server" />
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtender3" runat="server" ServiceMethod="PortAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtPod" FirstRowSelected="true"
                                        CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                        OnClientItemSelected="OnPodSelected">
                                    </asp:AutoCompleteExtender>
                                    <asp:TextBox class="cls" ID="txtCountryToSearch" runat="server" Width="90px" PlaceHolder="To Country"></asp:TextBox>
                                    <asp:HiddenField ID="hidCountryToSearch" runat="server"></asp:HiddenField>
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" ServiceMethod="CountryAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtCountryToSearch"
                                        FirstRowSelected="true" CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" DelimiterCharacters=","
                                        OnClientItemSelected="OnCountryToSelected">
                                    </asp:AutoCompleteExtender>
                                    <%--To Service Area--%>
                                    <asp:TextBox class="cls" ID="txtServiceAreaToSearch" runat="server" Width="110px"
                                        PlaceHolder="To SerArea"></asp:TextBox>
                                    <asp:HiddenField ID="hidServiceAreaToSearch" runat="server"></asp:HiddenField>
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtender4" runat="server" ServiceMethod="ServiceAreaAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtServiceAreaToSearch"
                                        FirstRowSelected="true" CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" OnClientItemSelected="OnServiceAreaToSelected">
                                    </asp:AutoCompleteExtender>
                                    <%--To Region--%>
                                    <asp:TextBox class="cls" ID="txtRegionToSearch" runat="server" Width="110px"
                                        PlaceHolder="To Region"></asp:TextBox>
                                    <asp:HiddenField ID="hidRegionToSearch" runat="server"></asp:HiddenField>
                                    <asp:AutoCompleteExtender ID="AutoCompleteExtender6" runat="server" ServiceMethod="RegionAutoCompleteAjaxRequest"
                                        ServicePath="Webservices/AutoComplete.asmx" MinimumPrefixLength="2" CompletionInterval="100"
                                        EnableCaching="false" CompletionSetCount="10" TargetControlID="txtRegionToSearch"
                                        FirstRowSelected="true" CompletionListCssClass="completionList" CompletionListItemCssClass="listItem"
                                        CompletionListHighlightedItemCssClass="itemHighlighted" OnClientItemSelected="OnRegionToSelected">
                                    </asp:AutoCompleteExtender>
                                    <asp:DropDownList ID="drPriceUpdateTime" runat="server" AutoPostBack="true" OnSelectedIndexChanged="drPriceUpdateTime_SelectedIndexChanged">
                                        <asp:ListItem Value="1500" Text="All quotes"></asp:ListItem>
                                        <asp:ListItem Value="-1" Text="Newest"></asp:ListItem>
                                        <asp:ListItem Value="0" Text="Any"></asp:ListItem>
                                        <asp:ListItem Value="2000" Text="All Schedule"></asp:ListItem>
                                        <asp:ListItem Value="500" Text="Frm 1st"></asp:ListItem>
                                        <asp:ListItem Value="1000" Text="Frm 15th"></asp:ListItem>
                                        <asp:ListItem Value="1" Text="1 ngày"></asp:ListItem>
                                        <asp:ListItem Value="3" Text="3 ngày"></asp:ListItem>
                                        <asp:ListItem Value="5" Text="5 ngày"></asp:ListItem>
                                        <asp:ListItem Value="10" Text="10 ngày"></asp:ListItem>
                                        <asp:ListItem Value="20" Text="20 ngày"></asp:ListItem>
                                        <asp:ListItem Value="30" Text="30 ngày"></asp:ListItem>
                                        <asp:ListItem Value="60" Text="60 ngày"></asp:ListItem>
                                        <asp:ListItem Value="90" Text="90 ngày"></asp:ListItem>
                                    </asp:DropDownList>
                                    <asp:Button class="button" ID="btnSearch" runat="server" TabIndex="13" Text="Search"
                                        OnClick="btnSearch_Click" />
                                </span>
                            </div>
                            <div class="clear">
                            </div>
                            <div style="margin-top: 10px; margin-left: 5px;">
                                <asp:Label ID="lblerror" CssClass="msg-error" runat="server" Style="foat: right;"></asp:Label><br />
                            </div>
                        </div>
                        <%=strAlphaBet%>
                        <fieldset>
                            <asp:Repeater ID="rptData" runat="server">
                                <ItemTemplate>
                                    <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'"
                                        priceid='<%#Eval("ID") %>'>
                                        <!--td>
                                        <%# DataBinder.Eval(Container.DataItem, "Sort")%>
                                    </td-->
                                        <td align="center" title="Index" width="28px" style="min-width: 28px; max-width: 28px; overflow: hidden;">
                                            <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                        </td>
                                        <td align="center" width="28px">
                                            <input type="checkbox" class="checkrate" name="cbCheckRate" value='<%#Eval("ID") %>' />
                                        </td>
                                        <td width="50px" style="min-width: 50px; max-width: 50px; overflow: hidden;">
                                            <b>
                                                <%# DataBinder.Eval(Container.DataItem, "CarrID")%>
                                            </b>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "PortTo")%>
                                        </td>
                                        <td>
                                            <%# DataBinder.Eval(Container.DataItem, "PortFrom")%>
                                        </td>
                                        <td width="50px" editable="true" style="min-width: 50px; max-width: 50px; overflow: hidden;"
                                            code="DC20" title='<%#GetCellTitle(Eval("DC20")) %>' class='<%#GetCellClass(Eval("DC20"))%>'>
                                            <%#GetCellValue(DataBinder.Eval(Container.DataItem, "DC20"))%>
                                        </td>
                                        <td width="50px" editable="true" style="min-width: 50px; max-width: 50px; overflow: hidden;"
                                            code="DC40" title='<%#GetCellTitle(Eval("DC40")) %>' class='<%#GetCellClass(Eval("DC40"))%>'>
                                            <%# GetCellValue(DataBinder.Eval(Container.DataItem, "DC40"))%>
                                        </td>
                                        <td width="50px" editable="true" style="min-width: 50px; max-width: 50px; overflow: hidden;"
                                            code="HC40" title='<%#GetCellTitle(Eval("HC40")) %>' class='<%#GetCellClass(Eval("HC40"))%>'>
                                            <%# GetCellValue(DataBinder.Eval(Container.DataItem, "HC40"))%>
                                        </td>
                                        <td width="50px" editable="true" style="min-width: 50px; max-width: 50px; overflow: hidden;"
                                            code="CONT45" title='<%#GetCellTitle(Eval("CONT45")) %>' class='<%#GetCellClass(Eval("CONT45"))%>'>
                                            <%# GetCellValue(DataBinder.Eval(Container.DataItem, "CONT45"))%>
                                        </td>
                                        <td width="60px" editable="true" style="min-width: 60px; max-width: 60px; overflow: hidden;"
                                            code="ValidityEx" title='<%#GetCellTitle(Eval("ValidityEx")) %>' class='<%#GetCellClass(Eval("ValidityEx"))%>'>
                                            <%# GetCellValue(DataBinder.Eval(Container.DataItem, "ValidityEx"))%>
                                        </td>
                                        <td editable="true" style="min-width: 70px; overflow: hidden;" title='<%#GetCellTitle(Eval("DescriptionEx")) %>'
                                            code='DescriptionEx' class='<%#GetCellClass(Eval("DescriptionEx"))%>'>
                                            <%#GetCellValue( DataBinder.Eval(Container.DataItem, "DescriptionEx"))%>
                                        </td>
                                        <td width="50px" editable="true" style="min-width: 50px; max-width: 50px; overflow: hidden;"
                                            code="RF20" title='<%#GetCellTitle(Eval("RF20")) %>' class='<%#GetCellClass(Eval("RF20"))%>'>
                                            <%#GetCellValue( DataBinder.Eval(Container.DataItem, "RF20"))%>
                                        </td>
                                        <td width="50px" editable="true" style="min-width: 50px; max-width: 50px; overflow: hidden;"
                                            code="RF40" title='<%#GetCellTitle(Eval("RF40")) %>' class='<%#GetCellClass(Eval("RF40"))%>'>
                                            <%# GetCellValue(DataBinder.Eval(Container.DataItem, "RF40"))%>
                                        </td>
                                        <td width="60px" editable="true" style="min-width: 60px; max-width: 60px; overflow: hidden;"
                                            code="Validity" title='<%#GetCellTitle(Eval("Validity")) %>' class='<%#GetCellClass(Eval("Validity"))%>'>
                                            <%# GetCellValue(DataBinder.Eval(Container.DataItem, "Validity"))%>
                                        </td>
                                        <td editable="true" style="min-width: 70px; overflow: hidden;" title='<%#GetCellTitle(Eval("Description")) %>'
                                            code='Description' class='<%#GetCellClass(Eval("Description"))%>'>
                                            <%#GetCellValue( DataBinder.Eval(Container.DataItem, "Description"))%>
                                        </td>
                                        <%--OTFL--%>
                                        <td width="50px" editable="true" style="min-width: 50px; max-width: 50px; overflow: hidden;"
                                            code="OT20" title='<%#GetCellTitle(Eval("OT20")) %>' class='<%#GetCellClass(Eval("OT20"))%>'>
                                            <%# GetCellValue(DataBinder.Eval(Container.DataItem, "OT20"))%>
                                        </td>
                                        <td width="50px" editable="true" style="min-width: 50px; max-width: 50px; overflow: hidden;"
                                            code="OT40" title='<%#GetCellTitle(Eval("OT40")) %>' class='<%#GetCellClass(Eval("OT40"))%>'>
                                            <%# GetCellValue(DataBinder.Eval(Container.DataItem, "OT40"))%>
                                        </td>
                                        <td width="50px" editable="true" style="min-width: 50px; max-width: 50px; overflow: hidden;"
                                            code="FL20" title='<%#GetCellTitle(Eval("FL20")) %>' class='<%#GetCellClass(Eval("FL20"))%>'>
                                            <%# GetCellValue(DataBinder.Eval(Container.DataItem, "FL20"))%>
                                        </td>
                                        <td width="50px" editable="true" style="min-width: 50px; max-width: 50px; overflow: hidden;"
                                            code="FL40" title='<%#GetCellTitle(Eval("FL40")) %>' class='<%#GetCellClass(Eval("FL40"))%>'>
                                            <%# GetCellValue(DataBinder.Eval(Container.DataItem, "FL40"))%>
                                        </td>
                                        <td width="60px" editable="true" style="min-width: 60px; max-width: 60px; overflow: hidden;"
                                            code="ValidityOTFL" title='<%#GetCellTitle(Eval("ValidityOTFL")) %>' class='<%#GetCellClass(Eval("ValidityOTFL"))%>'>
                                            <%# GetCellValue(DataBinder.Eval(Container.DataItem, "ValidityOTFL"))%>
                                        </td>
                                        <td editable="true" style="min-width: 60px; overflow: hidden;" title='<%#GetCellTitle(Eval("DescriptionOTFL")) %>'
                                            code='DescriptionOTFL' class='<%#GetCellClass(Eval("DescriptionOTFL"))%>'>
                                            <%#GetCellValue( DataBinder.Eval(Container.DataItem, "DescriptionOTFL"))%>
                                        </td>
                                        <%if ((Session["prices"] != null) && (int.Parse(Session["prices"].ToString()) >= 3))
                                          {%>
                                        <td align="center">
                                            <%# DataBinder.Eval(Container.DataItem, "Action")%>
                                        </td>
                                        <%} %>
                                        <%--<td style="position: fixed; right: -1000px; margin:0; padding:0; width:0px; display:none;">
                                            &nbsp;
                                        </td>--%>
                                    </tr>
                                </ItemTemplate>
                                <HeaderTemplate>
                                    <div autofit="true" style="">
                                        <table editcellcontent="true" cellspacing="0" cellpadding="0" width="auto" border="0"
                                            class="adminlist" resizeable="true">
                                            <thead>
                                                <tr>
                                                    <th rowspan="2" align="center">Index
                                                    </th>
                                                    <th rowspan="2" align="center">
                                                        <input type="checkbox" id="selectAll" />
                                                    </th>
                                                    <th rowspan="2" align="center" class="resizeable">Carr
                                                    </th>
                                                    <th rowspan="2" align="center" class="resizeable">POL
                                                    </th>
                                                    <th rowspan="2" align="center" class="resizeable">POD
                                                    </th>
                                                    <th colspan="18">
                                                        <%=Session["PortToName"] %>
                                                    to
                                                    <%=Session["PortFromName"] %>
                                                    </th>
                                                </tr>
                                                <tr>
                                                    <th align="center" class="resizeable unviewable" code="DC20">DC20
                                                    </th>
                                                    <th align="center" class="resizeable unviewable" code="DC40">DC40
                                                    </th>
                                                    <th class="resizeable unviewable" code="HC40">HC40
                                                    </th>
                                                    <th align="center" class="resizeable unviewable" code="CONT45">45'
                                                    </th>
                                                    <th align="center" class="resizeable unviewable" code="ValidityEx">Validity
                                                    </th>
                                                    <th align="center" class="resizeable unviewable" code="DescriptionEx">Note
                                                    </th>
                                                    <th align="center" class="resizeable unviewable" code="RF20">RF20
                                                    </th>
                                                    <th align="center" class="resizeable unviewable" code="RF40">RF40
                                                    </th>
                                                    <th align="center" class="resizeable unviewable" code="Validity">Validity
                                                    </th>
                                                    <th align="center" class="resizeable unviewable" code="Description">Note
                                                    </th>
                                                    <%--OTFL--%>
                                                    <th class="resizeable unviewable" code="OT20">OT20
                                                    </th>
                                                    <th align="center" class="resizeable unviewable" code="OT40">OT40
                                                    </th>
                                                    <th align="center" class="resizeable unviewable" code="FL20">FL20
                                                    </th>
                                                    <th align="center" class="resizeable unviewable" code="FL40">FL40
                                                    </th>
                                                    <th align="center" class="resizeable unviewable" code="ValidityOTFL">Validity
                                                    </th>
                                                    <th align="center" class="resizeable unviewable" code="DescriptionOTFL">Note
                                                    </th>
                                                    <%if ((Session["prices"] != null) && (int.Parse(Session["prices"].ToString()) >= 3))
                                                      {%>
                                                    <th align="center">#
                                                    </th>
                                                    <%} %>
                                                    <%--<td style="position: fixed; right: -1000px;">
                                                    &nbsp;
                                                </td>--%>
                                                </tr>
                                            </thead>
                                </HeaderTemplate>
                                <FooterTemplate>
                                    </TABLE> </div>
                                </FooterTemplate>
                            </asp:Repeater>
                        </fieldset>
                        <div class="clear">
                        </div>
                        <% if (isSearch)
                           {%>
                        <div id="footer">
                            <%=strPager%>
                        </div>
                        <%}%>
                    </div>
                    <% if (!isSearch)
                       { %>
                    <div class="content-box-header">
                        <h3 style="cursor: s-resize;">Good Price</h3>
                        <asp:Button ID="btnUpdateGoodPriceRouting" runat="server" CssClass="button" Style="float: right; margin: 10px 5px;"
                            Text="&nbsp;Update&nbsp;" OnClick="btnUpdateGoodPriceNotices_Click" />
                        <div class="clear">
                        </div>
                        <div style="float: left; margin: 10px 5px;">
                            <asp:DropDownList ID="ddGoodPriceSer" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddGoodPriceSer_SelectedIndexChanged">
                            </asp:DropDownList>
                            POD:
                        <asp:DropDownList ID="ddGoodPriceCountry" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddGoodPriceCountry_SelectedIndexChanged">
                        </asp:DropDownList>
                        </div>
                    </div>
                    <%--Good Price Notices--%>
                    <div id="GoodPricesNotice">
                        <asp:Repeater ID="rpGoodPricesNotice" runat="server">
                            <ItemTemplate>
                                <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'"
                                    class='GPN_<%#Eval("ID") %>'>
                                    <td align="center">
                                        <%# DataBinder.Eval(Container.DataItem, "Index")%>
                                        <asp:HiddenField ID="ID" runat="server" Value='<%# DataBinder.Eval(Container.DataItem, "ID")%>'></asp:HiddenField>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="CARRNAME" runat="server" Width="95%" Text='<%# DataBinder.Eval(Container.DataItem, "CARRNAME")%>'
                                            CssClass="goopricenotice carrname"></asp:TextBox>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="POL" runat="server" Width="95%" Text='<%# DataBinder.Eval(Container.DataItem, "POL")%>'
                                            CssClass="goopricenotice pol"></asp:TextBox>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="POD" runat="server" Width="95%" Text='<%# DataBinder.Eval(Container.DataItem, "POD")%>'
                                            CssClass="goopricenotice pod"></asp:TextBox>
                                    </td>
                                    <td align="center">
                                        <asp:TextBox ID="CONT" runat="server" Width="95%" Text='<%# DataBinder.Eval(Container.DataItem, "CONT")%>'
                                            CssClass="goopricenotice cont"></asp:TextBox>
                                    </td>
                                    <td align="center">
                                        <asp:TextBox ID="RATE" runat="server" Width="95%" Text='<%# DataBinder.Eval(Container.DataItem, "RATE")%>'
                                            class='<%#GetCellClassForNotice(Eval("DATEFROM"))%>'></asp:TextBox>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="DOC" runat="server" Width="95%" Text='<%# DataBinder.Eval(Container.DataItem, "DOC")%>'
                                            CssClass="goopricenotice doc" Style='<%# Eval("DOC").ToString() == "HBL"? "font-weight:bold;": "" %>'></asp:TextBox>
                                    </td>
                                    <td align="center">
                                        <asp:TextBox ID="DATEFROM" runat="server" Width="95%" Text='<%# DataBinder.Eval(Container.DataItem, "DATEFROM")%>'
                                            CssClass="goopricenotice datefrom"></asp:TextBox>
                                    </td>
                                    <td align="center">
                                        <asp:TextBox ID="DATETO" runat="server" Width="95%" Text='<%# DataBinder.Eval(Container.DataItem, "DATETO")%>'
                                            CssClass="goopricenotice dateto"></asp:TextBox>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="NOTE" runat="server" Width="98%" Text='<%# DataBinder.Eval(Container.DataItem, "NOTE")%>'
                                            CssClass="goopricenotice"></asp:TextBox>
                                    </td>
                                    <td align="center">
                                        <%# DataBinder.Eval(Container.DataItem, "USER")%>
                                    </td>
                                    <%if (nPermissions > 7)
                                      {%><td align="center">
                                          <%# DataBinder.Eval(Container.DataItem, "Action")%>
                                      </td>
                                    <%} %>
                                </tr>
                            </ItemTemplate>
                            <HeaderTemplate>
                                <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                                    <thead>
                                        <tr>
                                            <th align="center" width="40px">Index
                                            </th>
                                            <th align="center" width="75px">CARR
                                            </th>
                                            <th align="center" width="150px">POL
                                            </th>
                                            <th align="center" width="150px">POD
                                            </th>
                                            <th align="center" width="50px">CONT
                                            </th>
                                            <th align="center" width="75px">RATE (USD)
                                            </th>
                                            <th align="center" width="50px">DOC
                                            </th>
                                            <th align="center" width="100px">FRM
                                            </th>
                                            <th align="center" width="100px">TO
                                            </th>
                                            <th align="center">RMK
                                            </th>
                                            <th align="center" width="50px">USER
                                            </th>
                                            <%if (nPermissions > 7)
                                              {%>
                                            <th align="center" width="50px">Action
                                            </th>
                                            <%} %>
                                        </tr>
                                    </thead>
                            </HeaderTemplate>
                            <FooterTemplate>
                                </TABLE>
                            </FooterTemplate>
                        </asp:Repeater>
                    </div>
                    <div class="clear">
                    </div>
                    <div id="Div1">
                        <%=strPager%>
                    </div>
                    <br />
                    <b>A NEW SALE OPPORTUNITY: &nbsp;&nbsp; &nbsp;</b><asp:TextBox ID="txtGoodPrice"
                        runat="server" Width="500px"></asp:TextBox>
                    <asp:Button class="button" ID="btnSaveGoodPrice" runat="server" TabIndex="13" Text="Save"
                        OnClick="btnSaveGoodPrice_Click" />
                    <%} %>
                    <asp:Repeater ID="rpGoodPrice" runat="server">
                        <ItemTemplate>
                            <tr onmouseover="this.style.background='#dbf0c9'" onmouseout="this.style.background='#ffffff'">
                                <td align="center" title="Index">
                                    <%# DataBinder.Eval(Container.DataItem, "IndexGoodPrice")%>
                                </td>
                                <td class="wrapword">
                                    <%# DataBinder.Eval(Container.DataItem, "PriceNotices")%>
                                </td>
                                <td align="center" title="Index">
                                    <%# DataBinder.Eval(Container.DataItem, "User")%>
                                </td>
                                <td align="center" title="Index">
                                    <%# DataBinder.Eval(Container.DataItem, "LastUpdate")%>
                                </td>
                                <%if ((Session["prices"] != null) && (int.Parse(Session["prices"].ToString()) >= 3))
                                  {%>
                                <td align="center">
                                    <%# DataBinder.Eval(Container.DataItem, "Action")%>
                                </td>
                                <%} %>
                            </tr>
                        </ItemTemplate>
                        <HeaderTemplate>
                            <table cellspacing="0" cellpadding="0" width="100%" border="0" class="adminlist">
                                <thead>
                                    <tr>
                                        <th align="center" width="75px">Index
                                        </th>
                                        <th class="wrapword">Notices
                                        </th>
                                        <th align="center" width="75px">User
                                        </th>
                                        <th align="center" width="75px">Update
                                        </th>
                                        <%if ((Session["prices"] != null) && (int.Parse(Session["prices"].ToString()) >= 3))
                                          {%>
                                        <th align="center" width="150px">Action
                                        </th>
                                        <%} %>
                                    </tr>
                                </thead>
                        </HeaderTemplate>
                        <FooterTemplate>
                            </TABLE>
                        </FooterTemplate>
                    </asp:Repeater>
                </form>
            </div>
        </div>
    </div>
    <span id="ruler" style="visibility: hiddens; white-space: nowrap"></span>
</body>
</html>
